package com.ship.dispatch.bean;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ship.common.core.base.Joinable;
import com.ship.common.core.mapping.Label;
import com.ship.common.core.mapping.SearchItem;
import com.ship.common.core.mapping.TableColumn;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 船舶运费信息表
 * @TableName sm_ship_freight_cost
 */
@TableName(value ="sm_ship_freight_cost")
public class SmShipFreightCost extends BaseBean implements Joinable {

    /**
     * jsfhccb_id
     */
    @ApiModelProperty(value = "报关后jsfhccb_id（用于详情查询）")
    private Long jsfhccbId;

    /**
     * jsfhccb_id
     */
    @ApiModelProperty(value = "报关前jsfhccb_id（用于详情查询）")
    private Long jsfhccbBeforeId;

    /**
     * process_instance_id
     */
    @ApiModelProperty(value = "process_instance_id（用于详情查询）")
    private String processInstanceId;

    /**
     * cost_key
     */
    @ApiModelProperty(value = "报关后cost_key（用于详情查询）")
    private String costKey;

    /**
     * cost_key
     */
    @ApiModelProperty(value = "报关前cost_key（用于详情查询）")
    private String costBeforeKey;

    /**
     * 航次号
     */
    @Label(value = "Voyage Number")
    @TableColumn
    @SearchItem
    @ApiModelProperty(value = "航次号")
    private String voyageNumber;

    /**
     * 装载港
     */
    @Label(value = "Loading Port")
    @TableColumn
    @SearchItem
    @ApiModelProperty(value = "装载港")
    private String loadingPort;

    /**
     * 卸载港
     */
    @Label(value = "Discharge Port")
    @TableColumn
    @SearchItem
    @ApiModelProperty(value = "卸载港")
    private String dischargePort;

    /**
     * 船舶名称
     */
    @Label(value = "Vessel Name")
    @TableColumn
    @SearchItem
    @ApiModelProperty(value = "船舶名称")
    private String vesselName;

    /**
     * imo
     */
    @Label(value = "imo")
    @TableColumn
    @SearchItem
    @ApiModelProperty(value = "imo")
    private String imo;

    /**
     * 航行开始时间
     */
    @ApiModelProperty(value = "航行开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date voyageStartTime;

    /**
     * 航行结束时间
     */
    @ApiModelProperty(value = "航行结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date voyageEndTime;

    /**
     * 航行时间
     */
    @Label(value = "Voyage Time")
    @TableColumn
    @ApiModelProperty(value = "航行时间")
    @TableField(exist = false)
    private String voyageTime;

    /**
     * 船舶租金
     */
    @Label(value = "Charter Cost")
    @TableColumn
    @ApiModelProperty(value = "船舶租金")
    private String charterCost;

    /**
     * 船代费
     */
    @Label(value = "Shipping agency cost")
    @TableColumn
    @ApiModelProperty(value = "船代费")
    private String shippingAgencyCost;

    /**
     * 保险
     */
    @Label(value = "Insurance")
    @TableColumn
    @ApiModelProperty(value = "保险")
    private String insurance;

    /**
     * LSMGO
     */
    @Label(value = "LSMGO")
    @TableColumn
    @ApiModelProperty(value = "LSMGO")
    private String lsmgo;

    /**
     * VLSFO
     */
    @Label(value = "VLSFO")
    @TableColumn
    @ApiModelProperty(value = "VLSFO")
    private String vlsfo;

    /**
     * Positioning fee
     */
    @Label(value = "Positioning fee")
    @TableColumn
    @ApiModelProperty(value = "Positioning fee")
    private String positioningFee;

    /**
     * Ballast Bonus
     */
    @Label(value = "Ballast Bonus")
    @TableColumn
    @ApiModelProperty(value = "Ballast Bonus")
    private String ballastBonus;

    /**
     * BOG
     */
    @Label(value = "BOG")
    @TableColumn
    @ApiModelProperty(value = "BOG")
    private String bog;

    /**
     * Total Transportation cost
     */
    @Label(value = "Total Transportation cost")
    @TableColumn
    @ApiModelProperty(value = "Total Transportation cost")
    private String totalTransportationCost;

    /**
     * Estimated discharge quantity
     */
    @Label(value = "Estimated discharge quantity")
    @TableColumn
    @ApiModelProperty(value = "Estimated discharge quantity")
    private String estimatedDischargeQuantity;

    /**
     * Shipping cost
     */
    @Label(value = "Shipping cost")
    @TableColumn
    @ApiModelProperty(value = "Shipping cost")
    private String shippingCost;

    @ApiModelProperty(value = "数据来源：1-船舶调度，2-人工上传")
    private String dataSource;

    public Long getJsfhccbId() {
        return jsfhccbId;
    }

    public void setJsfhccbId(Long jsfhccbId) {
        this.jsfhccbId = jsfhccbId;
    }

    public Long getJsfhccbBeforeId() {
        return jsfhccbBeforeId;
    }

    public void setJsfhccbBeforeId(Long jsfhccbBeforeId) {
        this.jsfhccbBeforeId = jsfhccbBeforeId;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public String getCostKey() {
        return costKey;
    }

    public void setCostKey(String costKey) {
        this.costKey = costKey;
    }

    public String getCostBeforeKey() {
        return costBeforeKey;
    }

    public void setCostBeforeKey(String costBeforeKey) {
        this.costBeforeKey = costBeforeKey;
    }

    public String getVoyageNumber() {
        return voyageNumber;
    }

    public void setVoyageNumber(String voyageNumber) {
        this.voyageNumber = voyageNumber;
    }

    public String getLoadingPort() {
        return loadingPort;
    }

    public void setLoadingPort(String loadingPort) {
        this.loadingPort = loadingPort;
    }

    public String getDischargePort() {
        return dischargePort;
    }

    public void setDischargePort(String dischargePort) {
        this.dischargePort = dischargePort;
    }

    public String getVesselName() {
        return vesselName;
    }

    public void setVesselName(String vesselName) {
        this.vesselName = vesselName;
    }

    public String getImo() {
        return imo;
    }

    public void setImo(String imo) {
        this.imo = imo;
    }

    public Date getVoyageStartTime() {
        return voyageStartTime;
    }

    public void setVoyageStartTime(Date voyageStartTime) {
        this.voyageStartTime = voyageStartTime;
    }

    public Date getVoyageEndTime() {
        return voyageEndTime;
    }

    public void setVoyageEndTime(Date voyageEndTime) {
        this.voyageEndTime = voyageEndTime;
    }

    public String getVoyageTime() {
        if (this.voyageStartTime != null && this.voyageEndTime != null) {
            String startTime = DateUtil.format(this.voyageStartTime, DatePattern.NORM_DATETIME_FORMATTER);
            String endTime = DateUtil.format(this.voyageEndTime, DatePattern.NORM_DATETIME_FORMATTER);
            return startTime + "-" + endTime;
        }
        return voyageTime;
    }

    public void setVoyageTime(String voyageTime) {
        this.voyageTime = voyageTime;
    }

    public String getCharterCost() {
        return charterCost;
    }

    public void setCharterCost(String charterCost) {
        this.charterCost = charterCost;
    }

    public String getShippingAgencyCost() {
        return shippingAgencyCost;
    }

    public void setShippingAgencyCost(String shippingAgencyCost) {
        this.shippingAgencyCost = shippingAgencyCost;
    }

    public String getInsurance() {
        return insurance;
    }

    public void setInsurance(String insurance) {
        this.insurance = insurance;
    }

    public String getLsmgo() {
        return lsmgo;
    }

    public void setLsmgo(String lsmgo) {
        this.lsmgo = lsmgo;
    }

    public String getVlsfo() {
        return vlsfo;
    }

    public void setVlsfo(String vlsfo) {
        this.vlsfo = vlsfo;
    }

    public String getPositioningFee() {
        return positioningFee;
    }

    public void setPositioningFee(String positioningFee) {
        this.positioningFee = positioningFee;
    }

    public String getBallastBonus() {
        return ballastBonus;
    }

    public void setBallastBonus(String ballastBonus) {
        this.ballastBonus = ballastBonus;
    }

    public String getBog() {
        return bog;
    }

    public void setBog(String bog) {
        this.bog = bog;
    }

    public String getTotalTransportationCost() {
        return totalTransportationCost;
    }

    public void setTotalTransportationCost(String totalTransportationCost) {
        this.totalTransportationCost = totalTransportationCost;
    }

    public String getEstimatedDischargeQuantity() {
        return estimatedDischargeQuantity;
    }

    public void setEstimatedDischargeQuantity(String estimatedDischargeQuantity) {
        this.estimatedDischargeQuantity = estimatedDischargeQuantity;
    }

    public String getShippingCost() {
        return shippingCost;
    }

    public void setShippingCost(String shippingCost) {
        this.shippingCost = shippingCost;
    }

    public String getDataSource() {
        return dataSource;
    }

    public void setDataSource(String dataSource) {
        this.dataSource = dataSource;
    }

    @Override
    public String getLabel() {
        return null;
    }

    @Override
    public String getValue() {
        return null;
    }
}